const state = {
  errorVisible:false,
  errorMsg:''
}

const mutations = {
  TOGGLE_ERROR: (state,device) => {
    state.errorVisible = !state.errorVisible
    state.errorMsg = device
  },
}

const actions = {
  changeError({ commit },device) {
    commit('TOGGLE_ERROR',device)
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
